package com.mav01.mrpbackend.service.impl;

import com.mav01.mrpbackend.mapper.MaterialMapper;
import com.mav01.mrpbackend.pojo.Material;
import com.mav01.mrpbackend.service.MrpProductsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MrpProductsServiceImpl implements MrpProductsService {

    @Autowired
    private MaterialMapper materialMapper;

    /**
     * 获取产品名称列表
     */
    @Override
    public List<Material> getProductNames() {
        List<Material> productNames = materialMapper.selectProductNames();
        if(productNames != null && !productNames.isEmpty()){
            return  productNames;
        }else{
            return null;
        }

    }
}
